package com.example.service.impl;

import com.example.model.NoticeEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @author long
 * @date 2024/9/3 11:08
 */
@Component
public class NoticeEventListener implements ApplicationListener<NoticeEvent> {

    @Override
    public void onApplicationEvent(NoticeEvent event) {

        System.out.println("接收到数据，监听器线程："+Thread.currentThread().getName()+" 数据："+event);

    }

}

